<?php
	if ($act == 'delete_by_page') {
		if (isset($_POST["page"]) && (strlen($_POST["page"])> 0)){	
			$commentclass->delete_comment_by_page($_POST["page"]);
		}
	} elseif ($act == 'delete_by_parent') {
		if (isset($_POST["parent"]) && (strlen($_POST["parent"])> 0) && isset($_POST["type"]) && (strlen($_POST["type"])> 0)){	
			$commentclass->delete_comment_by_parent($_POST["parent"], $_POST["type"]);
		}
	} elseif ($act == 'delete_by_comment_id') {
		if (isset($_POST["comment_id"]) && (strlen($_POST["comment_id"])> 0)){
			$commentclass->delete_comment_by_comment_id($_POST["comment_id"]);
		}
	} elseif ($act == 'delete_all') {
		$commentclass->delete_all_comment();
	}
?>